export default {
  data() {
    return {
      navbarHeight: 0,
      windowHeight: 0
    }
  },
  onReady() {
    // #navbar为NavBar组件设置的id
    let info = uni.createSelectorQuery().select('#navbar')
    info.boundingClientRect((data) => {
        this.navbarHeight = data.height
      }).exec()
    this.windowHeight = uni.getWindowInfo().windowHeight
  },
  methods: {
    back () {
      uni.navigateBack({
        delta: 1 // 返回上一个页面
      })
    }
  }
}